package com.example.administrator.testhttpclient;

import android.util.Log;
import android.view.View;
import android.widget.AdapterView;

/**
 * Created by Administrator on 2015/11/24.
 */
public class SpinnerSelectedListener implements AdapterView.OnItemSelectedListener {

    @Override
    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
        Log.i("tiantong", position + "..");
        switch (position) {
            case 0:
                MainActivity.reinf.setSel_XNXQ("20150");
                break;
            case 1:
                MainActivity.reinf.setSel_XNXQ("20141");
                break;
            case 2:
                MainActivity.reinf.setSel_XNXQ("20140");
                break;
            case 3:
                MainActivity.reinf.setSel_XNXQ("20131");
                break;
            case 4:
                MainActivity.reinf.setSel_XNXQ("20130");
                break;
            case 5:
                MainActivity.reinf.setSel_XNXQ("20121");
                break;
            case 6:
                MainActivity.reinf.setSel_XNXQ("20120");
                break;
            case 7:
                MainActivity.reinf.setSel_XNXQ("20111");
                break;
            case 8:
                MainActivity.reinf.setSel_XNXQ("20110");
                break;
            case 9:
                MainActivity.reinf.setSel_XNXQ("20101");
                break;
            case 10:
                MainActivity.reinf.setSel_XNXQ("20100");
                break;
        }

    }

    public void onNothingSelected(AdapterView<?> arg0) {
        MainActivity.reinf.setSel_XNXQ("20150");
    }
}
